package cn.factorybox.model.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;

import java.util.Date;

/**
 * @author flypig
 * @version 1.0
 * @date 2020-09-10 14:04
 */
public class FactoryDeviceData {

    private static final long serialVersionUID = 1L;

    @JsonInclude(JsonInclude.Include.NON_NULL)
    private String id;                          // 唯一id

    @JsonInclude(JsonInclude.Include.NON_NULL)
    private String deviceId;                    // 设备id

    @JsonInclude(JsonInclude.Include.NON_NULL)
    private String fSerialNumber;               //设备编号

    @JsonProperty("temp")
    private Double fTemperature;                //空气温度

    @JsonProperty("hum")
    private Double fHumidity;                   //空气湿度

    @JsonProperty("co2")
    private Double fCarbonDioxide;              //二氧化碳

    @JsonProperty("tvoc")
    private Double fTvoc;                       //tvoc

    @JsonProperty("press")
    private Double fPressure;                   //压强

    @JsonInclude(JsonInclude.Include.NON_NULL)
    @JsonProperty("o3")
    private Double fO3;                     //臭氧

    @JsonInclude(JsonInclude.Include.NON_NULL)
    @JsonProperty("wind")
    private Double fWind;               //风速

    @JsonProperty("pm25")
    private Double fPm;                 //pm2.5

    @JsonInclude(JsonInclude.Include.NON_NULL)
    @JsonProperty("devicename")
    private String deviceName;      // 设备名称

    @JsonInclude(JsonInclude.Include.NON_NULL)
    @JsonProperty("roomname")
    private String roomName;        // 房间名称

    @JsonInclude(JsonInclude.Include.NON_NULL)
    private String iCount;          // 设备类型

    @JsonInclude(JsonInclude.Include.NON_NULL)
    private String state;       // 数据状态，normal或者warning

    @JsonInclude(JsonInclude.Include.NON_NULL)
    @JsonFormat(pattern="yyyy-MM-dd",timezone = "GMT+8")
    private Date date;      //创建日期

    @JsonFormat(pattern="HH:mm:ss",timezone = "GMT+8")
    private Date time;      //创建时间

    @JsonInclude(JsonInclude.Include.NON_NULL)
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date fCreateTime;      //创建时间

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getDeviceId() {
        return deviceId;
    }

    public void setDeviceId(String deviceId) {
        this.deviceId = deviceId;
    }

    public String getfSerialNumber() {
        return fSerialNumber;
    }

    public void setfSerialNumber(String fSerialNumber) {
        this.fSerialNumber = fSerialNumber;
    }

    public Double getfTemperature() {
        return fTemperature;
    }

    public void setfTemperature(Double fTemperature) {
        this.fTemperature = fTemperature;
    }

    public Double getfHumidity() {
        return fHumidity;
    }

    public void setfHumidity(Double fHumidity) {
        this.fHumidity = fHumidity;
    }

    public Double getfCarbonDioxide() {
        return fCarbonDioxide;
    }

    public void setfCarbonDioxide(Double fCarbonDioxide) {
        this.fCarbonDioxide = fCarbonDioxide;
    }

    public Double getfTvoc() {
        return fTvoc;
    }

    public void setfTvoc(Double fTvoc) {
        this.fTvoc = fTvoc;
    }

    public Double getfPressure() {
        return fPressure;
    }

    public void setfPressure(Double fPressure) {
        this.fPressure = fPressure;
    }

    public Double getfO3() {
        return fO3;
    }

    public void setfO3(Double fO3) {
        this.fO3 = fO3;
    }

    public Double getfWind() {
        return fWind;
    }

    public void setfWind(Double fWind) {
        this.fWind = fWind;
    }

    public Double getfPm() {
        return fPm;
    }

    public void setfPm(Double fPm) {
        this.fPm = fPm;
    }

    public Date getfCreateTime() {
        return fCreateTime;
    }

    public void setfCreateTime(Date fCreateTime) {
        this.fCreateTime = fCreateTime;
    }

    public String getDeviceName() {
        return deviceName;
    }

    public void setDeviceName(String deviceName) {
        this.deviceName = deviceName;
    }

    public String getRoomName() {
        return roomName;
    }

    public void setRoomName(String roomName) {
        this.roomName = roomName;
    }

    public String getiCount() {
        return iCount;
    }

    public void setiCount(String iCount) {
        this.iCount = iCount;
    }

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    public Date getDate() {
        return date;
    }

    public void setDate(Date date) {
        this.date = date;
    }

    public Date getTime() {
        return time;
    }

    public void setTime(Date time) {
        this.time = time;
    }

    @Override
    public String toString() {
        return "FactoryDeviceData{" +
                "id='" + id + '\'' +
                ", fSerialNumber='" + fSerialNumber + '\'' +
                ", fTemperature=" + fTemperature +
                ", fHumidity=" + fHumidity +
                ", fCarbonDioxide=" + fCarbonDioxide +
                ", fTvoc=" + fTvoc +
                ", fPressure=" + fPressure +
                ", fO3=" + fO3 +
                ", fWind=" + fWind +
                ", fPm=" + fPm +
                ", state=" + state +
                ", fCreateTime=" + fCreateTime +
                '}';
    }
}
